﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class frmEmpaque : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("MenuSoporte.aspx");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        SqlDataSource1.InsertParameters["tipoEnvase"].DefaultValue = DropDownList1.SelectedItem.ToString();
        SqlDataSource1.InsertParameters["capacidadEnvase"].DefaultValue = TextBox2.Text.ToString().ToUpper() + " " + DropDownList2.SelectedItem.ToString();
        SqlDataSource1.InsertParameters["presentacionEnvase"].DefaultValue = TextBox3.Text.ToString().ToUpper();
        SqlDataSource1.Insert();

        DropDownList1.SelectedIndex = 0;
        TextBox2.Text = "";
        TextBox3.Text = "";
        Label1.Text = "Envase agregado correctamente";
        Response.Redirect("frmEnvase.aspx");
        
    }
}